[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
CCTYPE(SEXP) (STRING)
Function
Determine the issuer of a credit card based on the credit card number.
Syntax
CCTYPE(ccnum)
ccnum = A string expression with the credit card number that is to
be checked.
Return Type & Value
STRING
Returns a string with the name of the card.
Remarks
PPL can be used to perform some simple credit card validation. This
function returns the issuer of a credit card based on the credit card
number.
For example, a valid credit card number that starts with a "4" is a Visa
card, so the string "VISA" will be returned. If a credit card is invalid
(VALCC() = FALSE) or not recognized, then "UNKNOWN" will be returned.
Other valid credit card with known types will return the appropriate
string.
The following card types are recognized by PPL:
"DISCOVER", "CARTE BLANCHE", "DINERS CLUB", "OPTIMA", "AMERICAN EXPRESS",
"VISA", and "MASTERCARD".
Examples
STRING s
INPUT "Credit card number",s
IF (VALCC(s)) PRINTLN LEFT(CCTYPE(s),20)," - ",FMTCC(s)
See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson